package com.xfsong.demo.repository;

import com.xfsong.demo.entity.Goods;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

public interface GoodsRepository extends JpaRepository<Goods, Long> {

    boolean existsByName(String name);

    Page<Goods> findAll(Pageable pageable);

    Page<Goods> findByNameContaining(String name, Pageable pageable);
}
